<?php
class Admin_Form_News extends Zend_Form{
	public function init(){
		$this->setName('news');
		
		$title = new Zend_Form_Element_Text('title');
		$title	->setLabel('Title')
				->setRequired(true)
				->setAttrib('class', 'titleInput')
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->addValidator('NotEmpty')
				->addValidator(new Zend_Validate_StringLength(4))
				->setDecorators(array('ViewHelper'));
		$this->addElement($title);
		
		$text = new Zend_Form_Element_Textarea('text');
		$text	->setLabel('Text')
				->setRequired(true)
				->addFilter('StripTags')
				->setAttrib('class', 'textInput')
				->addFilter('StringTrim')
				->addValidator('NotEmpty')
				->addValidator(new Zend_Validate_StringLength(4))
				->setDecorators(array('ViewHelper'));
		$this->addElement($text);
		
		$submit = new Zend_Form_Element_Submit('submit');
		$submit	->setLabel('Send')
				->setDecorators(array('ViewHelper'));
		$this->addElement($submit);
		
		$hidden = new Zend_Form_Element_Hidden('id');
		$hidden	->setDecorators(array('ViewHelper'));
		$this->addElement($hidden);
	}
}